package cn.getech.data.metadata.fallback;

import cn.getech.data.development.api.DefaultSecurityDataApi;
import cn.getech.data.development.vo.SecurityLevelVO;
import cn.getech.system.center.api.SystemUserApi;
import cn.getech.system.center.entity.SysUserEntity;
import cn.getech.system.center.entity.SysUserTokenEntity;
import lombok.extern.slf4j.Slf4j;

/**
 * @ClassName SystemUserFallback
 * @Description TODO
 * @Author Getech
 * @Date 2020/12/25 15:38
 */
@Slf4j
public class SecurityDataFallback implements DefaultSecurityDataApi {

    private Throwable throwable;

    public SecurityDataFallback(Throwable throwable) {
        this.throwable = throwable;
    }


    /**
     * @Description 降级处理方法
     * @Author  chengweiping
     * @Date   2020/12/25 15:42
     */
    @Override
    public SecurityLevelVO getDefaultSecurityDataLevel() {
        log.error(throwable.getMessage());
        return new SecurityLevelVO();
    }
}
